<template>
  <div>
    <h2>{{showFooter}}</h2>
    <h2>{{numalbe}}</h2>
    <el-button type="info" @click="hide">false</el-button>
    <el-button type="warning" @click="open">true</el-button>
    <el-button type="warning" @click="num">num</el-button>
  </div>
</template>

<script>
export default {
  name: "HelloWorld",
  data() {
    return {
      showFooter: "show",
      numalbe: 0
    };
  },
  methods: {
    hide: function() {
      this.$store.dispatch("hideFooter");
      this.showFooter = this.$store.getters.isShow;
    },
    open: function() {
      this.$store.dispatch("showFooter");
      this.showFooter = this.$store.getters.isShow;
    },
    num: function() {
      this.$store.dispatch("getNewNum", 100);
      this.numalbe = this.$store.getters.getChangeNum;
    }
  }
};
</script>

<style scoped>
h1,
h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
